import os
import sys

n = int(input())
arr = input().strip()
s = 'lanqiaobe'
ans = []
for i in range(n):
    str1 = []
    j = i
    while j < n and (arr[j] not in str1):
        str1.append(arr[j])
        j += 1
    if len(str1) > 0:
        ans.append(str1)


def getValue(a: list):
    global s
    v = 0
    flag = False
    for i in range(len(a)):
        v += ord(a[i]) - 96
        if a[i] == s[0]:
            v += 10
            j = 1
            while i + j < len(a) and j < len(s):
                if a[i + j] == s[j]:
                    v += 10
                    j += 1
                    continue
                break
    return v


def getMax(a: list):
    max = getValue(a[0])
    ans = a[0]
    for e in a:
        v = getValue(e)
        if v == max:
            if str(ans) > str(e):
                ans = e
        if v > max:
            max = v
            ans = e
    return ans


ans = getMax(ans)
for e in ans:
    print(e, end='')
# for an in ans:
#     print(an)
# print(ord('a') - 96)
